package test.testPanels;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.HashMap;

import javax.swing.JButton;
import javax.swing.JLabel;

import org.apache.log4j.Logger;

import ui.flowManager.expirimentProperties.ExperimentProperties;
import ui.panels.Panel;
import ui.panels.PanelTypes;
import ui.panels.PanelTypes.PanelType;
import ui.panels.commands.NextCommand;

public class BasicPanel extends Panel{

	Logger log = Logger.getLogger(this.getClass());
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public BasicPanel(HashMap<String, String> map){
		super();
	}
	
	public PanelType getPanelType() {
		return null;
	}

	public void show(ExperimentProperties props) {
		log.debug("started show in basic panel");
		JLabel listLbl = new JLabel("Panel 1");
		JButton nextButton = new JButton("Next");
	       nextButton.setBounds(50, 60, 80, 30);
	       nextButton.addActionListener(new ActionListener() {
	           public void actionPerformed(ActionEvent event) {
	               NextCommand next=new NextCommand();
	               next.execute();
	          }
	       });
	       
		setSize(300, 250);
		add(listLbl);
		add(nextButton);
		setVisible(true);
	}

	
	@Override
	public void setFromPropertiesConfig(HashMap<String, String> map) {
		// TODO Auto-generated method stub
		
	}


}
